{template('../public/header.html')}

<!--友情链接列表-->
<div class="pad_10" >

    <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
            <td>
            <div class="explain_col">
            	<input type="hidden" name="m" value="admin" />
                <input type="hidden" name="c" value="flink" />
                <input type="hidden" name="a" value="index" />
                <input type="hidden" name="menuid" value="{$menuid}" />
				所属分类：
                <select name="cate_id">
					<option value="">--请选择分类--</option>
					{$rs_cate type='rs'}
						<option value="{$rs_cate("id")}" {if search("cate_id")=rs_cate("id")} selected="selected" {/if}>{$rs_cate("name")}</option>
					{/$rs_cate}
                </select>&nbsp;
                关键字 :
                <input name="keyword" type="text" class="input-text" size="25" value="{$search('keyword')}" />
                <input type="submit" name="search" class="btn" value="搜索" />
        	</div>
            </td>
            </tr>
        </tbody>
    </table>
    </form>
    
    <div class="J_tablelist table_list" data-acturi="{:U('flink/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th><span tdtype="order_by" fieldname="id">ID</span></th>
				<th align="center">缩略图</th>
                <th align="left"><span data-tdtype="order_by" data-field="name">链接名称</span></th>
                <th align="left"><span data-tdtype="order_by" data-field="url">链接地址</span></th>
                <th align="center">分类名称</th>
				<th align="left"><span data-tdtype="order_by" data-field="ordid">排序</span></th>
                <th width="40"><span data-tdtype="order_by" data-field="status">{:L('status')}</span></th>
                <th width="80">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
			{$rs type='rs' pagesize='0' }
            <tr>
                <td align="center">
                <input type="checkbox" class="J_checkitem" value="{$rs('id')}"></td>
                <td align="center">{$rs('id')}</td>
                <td align="center">
				{@noempty for="rs('img')"}
                    <span class="" file-type="image" file-rel="{:attach(rs('img'),MODULE_NAME)}">
    				<img src="{:attach(rs('img'),MODULE_NAME)}" style="width:26px; height:26px;" class="J_preview" data-bimg="{:attach(rs('img'),MODULE_NAME)}" />
    				</span>
                {/@noempty}
				</td>
                <td align="left"><span data-tdtype="edit" data-field="name" data-id="{$rs('id')}" class="tdedit">{$rs('name')}</span></td>
                <td align="left"><span data-tdtype="edit" data-field="url" data-id="{$rs('id')}" class="tdedit">{$rs('url')}</span></td>
                <td align="center"><b>{$rs('cate_name')}<!-- {:M("flink_cate")().Find(rs("cate_id")).getField("name")} --></b></td>
				<td align="left"><span data-tdtype="edit" data-field="ordid" data-id="{$rs('id')}" class="tdedit">{$rs('ordid')}</span></td>
                <td align="center"><img data-tdtype="toggle" data-id="{$rs('id')}" data-field="status" data-value="{$rs('status')}" src="__STATIC__/images/admin/toggle_{if rs('status')=1}enabled{else}disabled{/if}.gif" /></td>
                <td align="center">
					<a href="javascript:;" class="J_showdialog" data-uri="{:U('flink/edit?id='& rs('id') )}" data-title="{:L('edit')} - {$rs('name')}"  data-id="edit" data-acttype="ajax" data-width="500" data-height="260">{:L('edit')}</a> | 
                    <a href="javascript:;" class="J_confirmurl" data-acttype="ajax" data-uri="{:U('flink/delete?id='& rs('id') )}" data-msg="您确定要删除“<font color=blue>{$rs('name')}</font>”吗？">{:L('delete')}</a>
					</td>
            </tr>
            {/$rs}
			{@empty for='rs'} <tr style="height:30px;"> <td align="left" colspan="9">&nbsp;&nbsp; <font color=red>暂无数据！</font></td> </tr>{/@empty}
    	</tbody>
    </table>
    </div>
	<div class="btn_wrap_fixed">
    	<label><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
    	<input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('flink/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
		<div id="pages">
			{@pager data='rs'}
				{$pager("total")} 条记录 {$pager("no")}/{$pager("count")} 页 {if pager("count")>1}{$pager("bar")}{/if}
			{/@pager}
		</div>
    </div>
</div>
{template('../public/footer.html')}
</body>
</html>